﻿using System;
using System.Threading;
using System.Threading.Tasks;
using GurLoader.Service;
using GurLoader.Service.ImgurTaskBuilder;

namespace GurLoader
{
    public class CommandPreparedEventArgs : EventArgs
    {
        public CommandPreparedEventArgs(Task<ImgurProcessResult> task, CancellationTokenSource cancellationTokenSource,
            Progress<IDelegatingCommandProgress> progress)
        {
            if (task == null)
                throw new ArgumentNullException("task");

            if (cancellationTokenSource == null)
                throw new ArgumentNullException("cancellationTokenSource");

            if (progress == null)
                throw new ArgumentNullException("progress");

            Task = task;
            CancellationTokenSource = cancellationTokenSource;
            Progress = progress;
        }

        public Task<ImgurProcessResult> Task { get; private set; }
        public CancellationTokenSource CancellationTokenSource { get; private set; }
        public Progress<IDelegatingCommandProgress> Progress { get; private set; }
    }
}